class Students:
    def __init__(self, student_name, student_id):
        self.name = student_name
        self.id = student_id
        self.grades = {"语文": 0, "数学": 0, "英语": 0}

    def set_grade(self, course, grade):
        if course in self.grades:
            self.grades[course] = grade

    def print_grades(self):
        print(f"学生{self.name}(学号：{self.id})的成绩为:")
        for course in self.grades:
            print(f"{course}:{self.grades[course]}分")


ming = Students("小明", "10086")
ming.set_grade("语文", "92")
ming.set_grade("数学", "95")
ming.print_grades()
